Loading TOC...

MarkLogic Server 11.0 Product Documentation
GET /manage/v2/hosts/{id|name}/properties

Summary

This resource address returns the current state of modifiable properties of the specified host.

URL Parameters
format The format of the returned data. Can be either json or xml (default). If present, the format parameter overrides the Accept header.
Request Headers
Accept The expected MIME type of the response. If the format parameter is present, it takes precedence over the Accept header. Allowed values: application/xml, application/json, and text/html.
Content-type The MIME type of the data in the request body. Depending upon the value of the format parameter or Accept header, one of application/xml, application/json, or text/html.
Response Headers
Content-type The MIME type of the data in the response body. Depending upon the value of the format parameter or Accept header, one of application/xml, application/json.

Response

Upon success, MarkLogic Server returns status code 200 (OK), and the response body contains the requested information. A status code of 401 (Unauthorized) is returned if the user does not have the necessary privileges.

Required Privileges

This operation requires the manage-user role, or the following privilege:

http://marklogic.com/xdmp/privileges/manage

Usage Notes

The structure of the output returned from this REST API is as follows:

dynamic-host

host-name

The internet host name.

group

A group name or id.

bind-port

The distributed protocol server socket bind internet port number.

foreign-bind-port

The distributed protocol foreign server socket bind internet port number.

zone

Zone the host belongs to.

bootstrap-host

host-mode

The mode of this host

host-mode-description

The description for this host mode

Example


$ curl --anyauth --user user:password -X GET -i \
    http://localhost:8002/manage/v2/hosts/my-host/properties

HTTP/1.1 200 OK
Content-type: application/xml
Cache-Control: no-cache
Expires: -1
Server: MarkLogic
Content-Length: 356
Connection: Keep-Alive
Keep-Alive: timeout=5

<host-properties 
    xsi:schemaLocation="http://marklogic.com/manage manage.xsd" 
    xmlns="http://marklogic.com/manage" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <host-name>my-host</host-name>
  <group>16709278353323551294</group>
  <bind-port>7999</bind-port>
  <foreign-bind-port>7998</foreign-bind-port>
  <zone/>
</host-properties>

The equivalent JSON output is shown below:

{
  "host-name": "my-host", 
  "group": "16709278353323551294", 
  "bind-port": 7999, 
  "foreign-bind-port": 7998, 
  "zone":""
}
    

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.